import { Component, EventEmitter, Input, Output, OnInit, ViewChild  } from '@angular/core';
import { Http} from '@angular/http';
import { ValuesPipe } from "../../../pipe/iterable.pipe";

@Component({
  selector: 'app-select',
  templateUrl: './select.component.html'
})
export class SelectComponent implements OnInit {
  @Output() public search:EventEmitter<any> = new EventEmitter<any>();

  division:any;
  oo:any = {devicename:'',province:'',city:'',district:''};
  constructor(private http:Http) { }

  ngOnInit() {
    this.http.get('assets/diqu.json').subscribe(response =>this.division = response.json());
  }


  submit(){
    this.search.emit(this.oo);
  }
}
